package com.huarui.ip.dao.impl;

import java.util.List;
import java.util.Map;

import org.ewaf.framework.dao.impl.BaseDaoImpl;

import com.huarui.ip.dao.IIpAddressDao;
import com.huarui.ip.model.IpAddress;

public class IpAddressDaoImpl extends BaseDaoImpl implements IIpAddressDao{

	@Override
	@SuppressWarnings("unchecked")
	public List<Map<String, Object>> getIpAddressListByComplex(
			Map<String, Object> paramsMap) {
		return this.getSqlMapClientTemplate().queryForList(super.namespace + ".getIpAddressListByComplex", paramsMap);
	}

	@Override
	public Integer getIpAddressListCountByComplex(Map<String, Object> paramsMap) {
		return (Integer) this.getSqlMapClientTemplate().queryForObject(super.namespace + ".getIpAddressListCountByComplex", paramsMap);
	}

	@Override
	public IpAddress getIpAddressByIp(long ip) {
		return (IpAddress) this.getSqlMapClientTemplate().queryForObject(super.namespace + ".getIpAddressByIp", ip);
	}

}
